import java.util.Scanner;

/**
 * Created with IntelliJ IDEA
 * Description:
 * User: Administrator
 * Data: 2023 - 11 - 21
 * Time: 20:46
 */
//剪花布条
public class Solution21 {
    public static void main1(String[] args) {
        Scanner in = new Scanner(System.in);
        // 注意 hasNext 和 hasNextLine 的区别
        while (in.hasNextLine()) { // 注意 while 处理多个 case
            String str = in.nextLine();
            String[] arr = str.split(" ");
            String str1 = arr[0];
            String str2 = arr[1];
            int count = 0;
            int count1 = 0;
            for (int i = 0; i <= str1.length() - str2.length(); i++) {
                if (str1.charAt(i) == str2.charAt(0)) {
                    int len1 = str2.length();
                    int k1 = i;
                    int k2 = 0;
                    while (len1 != 0) {
                        if (str1.charAt(k1) == str2.charAt(k2)) {
                            k1++;
                            k2++;
                        } else {
                            break;
                        }
                        len1--;
                    }
                    if (len1 == 0) {
                        count1++;
                    }
                }
                if (count1 != 0) {
                    i += str2.length() - 1;
                    count++;
                }
                count1 = 0;
            }
            System.out.println(count);
        }
    }
}
